<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>测试页</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<script src="js/vue.min.js"></script>
<script src="js/axios.min.js"></script>
</head>
<body>
	<div id="app">
		<table class="table table-bordered">
			<tr>
			    <th v-for="name in nameList">{{name}}</th>
			</tr>
			<tr>
				<td v-for="num in numList">{{num}}</td>
			</tr>
		</table>
	</div>
</body>
<script>
    var vue = new Vue({
        el:"#app",
        data:{
            nameList:[],
            numList:[]
        },
        created:function(){
            this.loadCourse();
        },
        methods:{
           loadCourse:function(){
               var that = this;
               axios.post("yearlyJson").then(function(res){
               	   that.nameList = res.data.name;
               	   that.numList = res.data.num;
               })
           }
        }
    })
</script>
</html>